<include file="public@header" />
<style>
    .table img{
        width:50px;
    }
</style>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row">
        <div class="layui-page-header">
            <div class="layui-card">
                <div class="layui-page-header-content">
                    <div class="layui-card-body">
                        <div class="layui-ui-page-header-title" >
                            评价列表
                        </div>
                    </div>
                    <div class="layui-tab layui-tab-brief">
                        <ul class="layui-tab-title">
                            <li><a href="javascript:history.back(-1);">课程列表</a></li>
                            <li class="layui-this"><a>评价列表</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-page-content">
            <div class="layui-card">
                <div class="layui-card-body">
                    课程名称：{$courseinfo['name']}
                    <br>
                    <br>
                    共{$nums}条评价
                </div>
            </div>
        </div>

        <div class="layui-page-content">
            <div class="layui-card">
                <div class="layui-card-body">
                    <form class="layui-form" method="post" action="{:url('coursecom/index')}">
                        <div class="layui-form-item layuiadmin-card-text" style="margin-bottom: 0;">
                            <div class="layui-inline">
                                <div class="layui-input-inline">
                                    <select class="layui-input" name="star">
                                        <option value="">全部星级</option>
                                        <for start="1" end="5">
                                            <option value="{$i}" <if condition="input('request.star') neq '' && input('request.star') eq $i">selected</if>>{$i}星</option>
                                        </for>
                                    </select>
                                </div>
                            </div>

                            <div class="layui-inline">
                                <div class="layui-input-inline">
                                    <input class="layui-input" type="text" name="keyword" style="width: 200px;" value="{:input('request.keyword')}" placeholder="请输入关键字">
                                </div>
                            </div>

                            <input type="hidden" name="courseid" value="{$courseinfo['id']}"/>

                            <div class="layui-inline">
                                <div class="layui-input-inline">
                                    <input type="submit" class="layui-btn btn-primary" value="搜索" />
                                    <a class="layui-btn layui-btn-danger btn-danger" href="{:url('coursecom/index',['courseid'=>$courseinfo['id']])}">清空</a>
                                </div>
                            </div>
                        </div>

                    </form>
                </div>
            </div>
        </div>

        <div class="layui-page-content">
            <div class="layui-card">
                <div class="layui-card-body">
                    <form method="post" class="layui-form js-ajax-form" action="" method="post">
                        <table class="layui-table table-hover table-bordered table-list" lay-even="" lay-size="lg">
                            <thead>
                            <tr>
                                <th>用户</th>
                                <th>评价内容</th>
                                <th>评价星级</th>
                                <th>评价时间</th>
                                <th align="center">{:lang('ACTIONS')}</th>
                            </tr>
                            </thead>
                            <tbody>
                            <foreach name="list" item="vo">
                                <tr>
                                    <td>{$vo['userinfo']['user_nickname']} ({$vo['userinfo']['id']})</td>
                                    <td>{$vo['content']}</td>
                                    <td>{$vo['star']}星</td>
                                    <td>{$vo['addtime']}</td>
                                    <td>
                                        <a class="layui-bo layui-bo-small layui-bo-close js-ajax-delete" href="{:url('coursecom/del',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
                                    </td>
                                </tr>
                            </foreach>
                            </tbody>
                        </table>
                        <div class="pagination">{$page}</div>
                    </form>

                </div>
            </div>
        </div>
    </div>





</div>
<include file="public@script"/>
</body>
</html>